Skip to main content

Add Policy

Route

/v2/policies

Description

Create a new data protection or content inspection policy with the provided configuration.

Method

POST

Inputs

ParameterTypeRequiredDescription
typestringYesPolicy type (data_protection, content_inspection)
namestringYesHuman-readable name for the policy
descriptionstringNoDetailed description of the policy's purpose
severitystringYesSeverity level (informational, low, medium, high, critical)
selection_typestringYesHow datasets are selected (dataset, sensitivity)
dataset_idsarray[string]NoList of dataset IDs (when selection_type is dataset)
dataset_sensitivitiesarray[integer]NoList of sensitivity levels (when selection_type is sensitivity)
ruleobjectYesRule configuration for policy enforcement actions
exclude_originbooleanNoWhether to exclude origin location in policy evaluation
backfills_enabledbooleanNoWhether historical data backfills are enabled

Request Body

{
"type": "data_protection",
"name": "Financial Data Protection",
"description": "Protect sensitive financial information",
"severity": "critical",
"selection_type": "sensitivity",
"dataset_sensitivities": [4, 5],
"rule": {
"status": "risky",
"create_incident": true,
"record_screenshots": true,
"inspect_content": true,
"realtime_response_config": {
"incident_action": "warn"
}
},
"exclude_origin": false,
"backfills_enabled": true
}

Output

FieldTypeDescription
typestringAlways "policies"
sizeintegerNumber of policies returned (always 1)
resourcesarray[Policy]Array containing the created policy
errorsarray[Error]Any errors encountered

Rate Limit

  • 60 requests per minute per API key
  • 5 concurrent requests per endpoint

Example Response

{
"type": "policies",
"size": 1,
"resources": [
{
"id": "policy-789",
"type": "data_protection",
"name": "Financial Data Protection",
"description": "Protect sensitive financial information",
"severity": "critical",
"disabled": false,
"selection_type": "sensitivity",
"dataset_sensitivities": [4, 5],
"created_at": "2024-01-15T10:30:00Z"
}
],
"errors": []
}